1. Field of the Invention
This invention relates to a mechanism for adaptive quality performance control in three-dimensional (3D) based personal computer applications, and more particularly to a mechanism for adaptively controlling multiple application programming interface (API) modes by selecting the best possible mode automatically using an aggregation function of quality and performance while, at the same time, giving the user the opportunity to change the mode through interactive control.
2. Description of the Related Art
The modern personal computer environment can be complex. For example, Windows 95 allows a user to choose multiple color depth modes (i.e., 16 colors, 256 colors, 16 bits high color, 32 bits true color), and multiple screen resolutions (640xc3x97480, 800xc3x97600, 1024xc3x97768, etc.). In addition, the different graphics"" accelerators accelerate 3D rendering in only a few modes, and use only limited texture mapping capabilities for picture placement. To assist in overcoming these limitations and to address the different needs and requirements of personal computer software developers and users, modern graphics application programming interface (API) usually supports multiple modes of usage, whether or not hardware can control acceleration of rendering. For instance, Microsoft""s Direct 3D API uses three separate API modes (see, Michael Stein, Eric Bowman, Gregory Pierce, Direct 3D Professional Reference, p.28-35, New Rider Publishing, Indianapolis, Ind., 1997):
HAL (hardware abstraction layer) mode for using the capabilities of 3D hardware accelerators;
HEL RGB (hardware emulation layer in 24-bit RGB) mode for use in quality oriented 3D software without special hardware assistance (through CPU); and
HEL RAMP (hardware emulation layer in 8-bit color) mode for use in performance oriented 3D software without special hardware assistance (through CPU).
Various mechanisms, such as controllers and interfaces, have been proposed for improving performance in the complex personal computer environment and for providing the computer with the ability to interface with general purpose 3D rendering applications. One such mechanism, proposed in U.S. Pat. No. 5,319,388, is embodied in a VGA controller having arbitration logic to provide bus access to a frame buffer so that both the system CPU and the display controller may independently access data in the frame buffer to minimize the amount of bandwidth required. While this arrangement may improve overall system performance, it does not provide for adaptive control of multiple API modes. Another type of mechanism, described in U.S. Pat. No. 5,432,900, integrates graphical, video and audio data into a single processing environment. An integrated graphics/video controller interfaces with application software through a graphics API and a video API. However, the system does not provide a method of selecting, from several possible API modes, the mode with the maximum aggregation function of quality and performance. Yet another device, set forth in U.S. Pat. No. 5,438,663, interfaces a computer system to a high-performance graphics adapter. While the interface provides compatibility for the graphics adapter, it does not offer the adaptive API mode control using quality/performance criteria.
A mechanism has also been proposed for controlling graphics modes in a computer. In U.S. Pat. No. 5,473,342, a RAMDAC circuit drives a monitor so as to display, multiple modes of color depth and display resolution in a single display frame and adjusts the output pixel rate to match that of the display mode being displayed on a pixel-by-pixel basis. The RAMDAC circuit switches between two graphics modes on-the-fly on a pixel-by-pixel basis in accordance with mode control bits stored in the pixel data. The circuit makes efficient use of certain hardware resources to enhance the performance of the overall system but does not affect the performance of the 3D graphics application. Moreover, neither the RAMDAC circuit nor any of the other system components provide adaptive control of API modes.
Therefore, it is an object of the present invention to overcome the aforementioned problems.
Another object of the present invention is to provide a mechanism and apparatus to adaptively control multiple API modes, to choose the best possible mode automatically, and to give the user the opportunity to change mode through interactive control.
One aspect of the invention is adapted to be embodied in a method for adaptively controlling multiple application programming interface (API) modes in a three dimensional based computer application on a computer system that supports multiple API modes of usage. The method comprises: assigning a quality value and a performance value to each of the multiple API modes and selecting one of quality and performance as a criteria; searching a mode list for the mode with a maximum aggregation function of quality and performance; determining if the mode having the maximum aggregation function is currently available for use; and automatically selecting the mode having the maximum aggregation function if it is determined to be available for use.
If it is determined that the mode having the maximum aggregation function is not available for use, then the next available mode in the mode list is selected. This mode is selected for use if it is determined to be the last mode in the mode list.
This method may be embodied in the form of software that may be stored on a computer system capable of running a three dimensional based computer application and supporting multiple API modes of usage. Such software may also be stored on a computer usable medium such as a floppy disk or CD ROM and may transferred to a suitable computer system for execution. The method may also be embodied in the form of hardware that is incorporated into an appropriately configured computer system.